package com.marketingexpert.service.storemgnt.test;

import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import com.marketingexpert.exception.MarketingExpertException;
import com.marketingexpert.service.storemgnt.ArticleUserSubscribe;
import com.marketingexpert.service.storemgnt.SubscribeService;

public class SubscribeServiceImpl implements SubscribeService  {

	private static final String article_code = "ts-1234";
	
	SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:ss:mm");
	
	public List<ArticleUserSubscribe> getSubscribe(String nick)  throws MarketingExpertException{
		
		ArticleUserSubscribe _aus = null;
		
		if(nick.equals("yuxing111")) {
			_aus = new ArticleUserSubscribe("ts-123-1", "2011-8-30 00:00:00");
		} 
		
		if(!nick.equals("yuxing111")) {
			_aus = new ArticleUserSubscribe("ts-123-0", "2011-8-30 00:00:00");
		}
		
		List<ArticleUserSubscribe> articleSubs = new ArrayList<ArticleUserSubscribe>();
		articleSubs.add(_aus);
		return articleSubs;
	}

}
